import request from "@/utils/request";

// 获取角色列表
export const getRoleListApi = (params) =>
  request({
    url: "/admin/permission/role",
    method: "get",
    params,
  });

//获取角色详情

export const getRoleDetailApi = (id) =>
  request({
    url: "/admin/permission/role/" + id,
    method: "get",
  });
// 新增角色
export const addRoleApi = (data) =>
  request({
    url: "/admin/permission/role",
    method: "post",
    data,
  });
// 编辑角色
export const editRoleApi = (data) =>
  request({
    url: "/admin/permission/role/" + data.id,
    method: "put",
    data,
  });
// 获取权限菜单
export const getPermissionMenuApi = () =>
  request({
    url: "/admin/permission/menu",
    method: "get",
  });
// 删除角色
export const delRoleApi = (id) =>
  request({
    url: "/admin/permission/role/" + id,
    method: "delete",
  });
